package cn.buk.tms.entity.order.flight;

import cn.buk.tms.entity.base.BaseInfo;

import jakarta.persistence.*;

/**
 * 机票订单的外部订单信息
 */
@Entity
@Table(name = "t255", uniqueConstraints = @UniqueConstraint(
        name = "uk_t255",
        columnNames = {"enterprise_id", "order_no", "supplier_id"}))
public class FlightOrderExternal extends BaseInfo {

    /**
     * 订单号
     */
    @Column(name = "order_no", nullable = false, updatable = false)
    private String orderNo;

    /**
     * 供应商id
     */
    @Column(name = "supplier_id", nullable = false, updatable = false)
    private Integer supplierId;

    /**
     * 外部订单号
     */
    @Column(name = "external_order_no", nullable = false, updatable = false)
    private String externalOrderNo;



    /**
     * 供应商名称
     */
    @Column(name = "supplier_name")
    private String supplierName;

    /**
     * 公布运价，也可以称之为航司指导价，票面价(不用于计算）,但在自动开票时用于对比价格
     */
    private Double price;

    /**
     * 销售价（国内航班一般等同于price, 但机票代理可能会加价销售，也就是在航司的实际销售价格基础上加价）
     */
    private Double parvalue;

    /**
     * 税（总税额）
     */
    private Double tax;


    /**
     * 第三方收取的开票服务费
     */
    @Column(name = "service_charge")
    private Double serviceCharge;

    /**
     * 第三方给予的让利金额
     */
    private Double discount;

    /**
     * 第三方订单的状态
     */
    private String orderStatus;

    /**
     * 来自第三方的备注
     */
    private String remark;

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public String getExternalOrderNo() {
        return externalOrderNo;
    }

    public void setExternalOrderNo(String externalOrderNo) {
        this.externalOrderNo = externalOrderNo;
    }

    public int getSupplierId() {
        return supplierId == null ? 0 : supplierId;
    }

    public void setSupplierId(Integer supplierId) {
        this.supplierId = supplierId;
    }

    public String getSupplierName() {
        return supplierName;
    }

    public void setSupplierName(String supplierName) {
        this.supplierName = supplierName;
    }

    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }

    public Double getParvalue() {
        return parvalue;
    }

    public void setParvalue(Double parvalue) {
        this.parvalue = parvalue;
    }

    public Double getTax() {
        return tax;
    }

    public void setTax(Double tax) {
        this.tax = tax;
    }

    public Double getServiceCharge() {
        return serviceCharge;
    }

    public void setServiceCharge(Double serviceCharge) {
        this.serviceCharge = serviceCharge;
    }

    public Double getDiscount() {
        return discount;
    }

    public void setDiscount(Double discount) {
        this.discount = discount;
    }

    public String getOrderStatus() {
        return orderStatus;
    }

    public void setOrderStatus(String orderStatus) {
        this.orderStatus = orderStatus;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }
}
